package crivia.ecp.dcp.list.carry;

import java.util.List;

import crivia.c.a.KeyLink;
import crivia.c.carry.SubCarry;
import crivia.c.carry.ValueField;
import crivia.c.exception.CarryIOFail;
import crivia.ecp.a.ECC;
import crivia.src.CI;

public class ListerColumn extends ECC {
	
	static {
		
		if (! createTable(ListerColumn.class, true)){
			throw new CarryIOFail("Data Base Table Create Fail.");
		}
		
	}
	
	public static void main(String[] args) {
		CI.refreshDBI(ListerColumn.class);
		CI.refreshFields(ListerColumn.class);
	}

	@Override
	public ValueField primaryKey() {
		return ValueField.c2d("id");
	}

	@Override
	public String tableName() {
		return "Crivia_DCP_PM_ListerCol";
	}

	@Override
	public void keyLinks(List<KeyLink> keyLinks) {
		keyLinks.add(SubCarry.c2d("lister", DCPLister.class));
		keyLinks.add(ValueField.c2d("title"));
		keyLinks.add(ValueField.c2d("dataKey"));
		keyLinks.add(ValueField.c2d("width"));
		keyLinks.add(ValueField.c2d("orderBy"));
		keyLinks.add(ValueField.c2d("showOrder",double.class));
	}




	


	//XXX DBI Begin.
	public enum Keys{
		lister("lister","lister")
		,title("title","title")
		,dataKey("dataKey","dataKey")
		,width("width","width")
		,orderBy("orderBy","orderBy")
		,showOrder("showOrder","showOrder")
		;
		private String _dbKey;
		private String _key;
		Keys(String key,String dbKey){_key=key;_dbKey=dbKey;}
		@Override
		public String toString(){return _dbKey;}
		/**  <b>Key</b> in <b>Carry</b>. */
		public String key(){return _key;}
	}
	private static crivia.ecp.dcp.list.carry.ListerColumn dbi;
	public synchronized static void initDBI(){if(null!=dbi)return;dbi=new crivia.ecp.dcp.list.carry.ListerColumn();}
	/**  <b>DB Table</b> of <b>Carry</b>. */
	public static String table(){initDBI();return dbi.tableName();}
	/**  <b>Primary Key</b> of <b>Carry</b>. */
	public static String pk(){initDBI();return dbi.pk4db();}
	/**  <b>Relation SQL</b> of <b>Relation Key</b>. */
	public static String rSQL(crivia.ecp.dcp.list.carry.ListerColumn.Keys k,String t){initDBI();return dbi.relationSQL(k.key(),t);}
	//XXX DBI End.



	// XXX Fields Begin.



	/** ...(Miss Tip Text.) */
	private java.lang.String id;
	/** Getter for ...(Miss Tip Text.) */
	public java.lang.String getId(){
		return id;
	}
	/** Setter for ...(Miss Tip Text.) */
	public crivia.ecp.dcp.list.carry.ListerColumn setId(java.lang.String id){
		this.id = id;
		return this;
	}


	/** ...(Miss Tip Text.) */
	private crivia.ecp.dcp.list.carry.DCPLister lister;
	/** Getter for ...(Miss Tip Text.) */
	public crivia.ecp.dcp.list.carry.DCPLister getLister(){
		if (null == lister){
			lister = new crivia.ecp.dcp.list.carry.DCPLister();
		}
		return lister;
	}
	/** Setter for ...(Miss Tip Text.) */
	public crivia.ecp.dcp.list.carry.ListerColumn setLister(crivia.ecp.dcp.list.carry.DCPLister lister){
		this.lister = lister;
		return this;
	}


	/** ...(Miss Tip Text.) */
	private java.lang.String title;
	/** Getter for ...(Miss Tip Text.) */
	public java.lang.String getTitle(){
		return title;
	}
	/** Setter for ...(Miss Tip Text.) */
	public crivia.ecp.dcp.list.carry.ListerColumn setTitle(java.lang.String title){
		this.title = title;
		return this;
	}


	/** ...(Miss Tip Text.) */
	private java.lang.String dataKey;
	/** Getter for ...(Miss Tip Text.) */
	public java.lang.String getDataKey(){
		return dataKey;
	}
	/** Setter for ...(Miss Tip Text.) */
	public crivia.ecp.dcp.list.carry.ListerColumn setDataKey(java.lang.String dataKey){
		this.dataKey = dataKey;
		return this;
	}


	/** ...(Miss Tip Text.) */
	private java.lang.String width;
	/** Getter for ...(Miss Tip Text.) */
	public java.lang.String getWidth(){
		return width;
	}
	/** Setter for ...(Miss Tip Text.) */
	public crivia.ecp.dcp.list.carry.ListerColumn setWidth(java.lang.String width){
		this.width = width;
		return this;
	}


	/** ...(Miss Tip Text.) */
	private java.lang.String orderBy;
	/** Getter for ...(Miss Tip Text.) */
	public java.lang.String getOrderBy(){
		return orderBy;
	}
	/** Setter for ...(Miss Tip Text.) */
	public crivia.ecp.dcp.list.carry.ListerColumn setOrderBy(java.lang.String orderBy){
		this.orderBy = orderBy;
		return this;
	}


	/** ...(Miss Tip Text.) */
	private double showOrder;
	/** Getter for ...(Miss Tip Text.) */
	public double getShowOrder(){
		return showOrder;
	}
	/** Setter for ...(Miss Tip Text.) */
	public crivia.ecp.dcp.list.carry.ListerColumn setShowOrder(double showOrder){
		this.showOrder = showOrder;
		return this;
	}


	// XXX Fields End.

}